home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_snow.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  67 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SHS_Snow.cog   Makes it snow.
  4. #
  5. # [JWC]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8.  
  9. symbols
  10.     message    startup
  11.     message crossed
  12.     message    pulse
  13.     
  14.     surface on        linkid=1
  15.     surface off        linkid=2
  16.     surface    on1        linkid=1
  17.     surface off1    linkid=2
  18.  
  19.  
  20.     thing    ghost0
  21.               
  22.     template    particle
  23.     
  24.     int            dummy       local
  25.     int         crosschk=0  local            
  26.     int         player        local
  27.  
  28.     flex        pulsetime=.5
  29.     
  30. end
  31.  
  32. code
  33.  
  34. startup:
  35.     player=GetLocalPlayerThing();
  36.     return;
  37.  
  38. crossed:
  39.     
  40.  
  41.     # make sure Indy player is sending message
  42.     If (GetSourceRef() != player) return;
  43.  
  44.     # turn snow on
  45.     If ((crosschk == 0)  && (GetSenderId() == 1))
  46.     {
  47.         Print("snow on");
  48.         crosschk = 1;
  49.         setpulse(pulsetime);
  50.     }    
  51.     
  52.     # turn snow off
  53.     If ((crosschk == 1) && (GetSenderId() == 2))
  54.     {
  55.         Print("snow off");
  56.         crosschk=0;
  57.         setpulse(0);
  58.     }
  59.     return;
  60.  
  61. pulse:
  62.     dummy=CreateThing(particle, ghost0);
  63.     return;
  64.     
  65.  
  66. end